package com.xing.game.logic;

import com.xing.game.bean.api.Bean;
import com.xing.game.logic.api.Handler;

import java.util.concurrent.ConcurrentHashMap;

@Bean(type = HandlerManagerImpl.class)
public class HandlerManagerImpl implements HandlerManager{

    private ConcurrentHashMap<Integer, Handler> messageId2Handlers = new ConcurrentHashMap<>();

    @Override
    public Handler getHandler(int messageId) {
        return messageId2Handlers.get(messageId);
    }
}
